<template>
  <div>
    <el-popover
        v-if="templateDataImg"
        placement="top-start"
        trigger="click"
    >
      <a :href="templateDataImg" target="_blank" title="查看图片">
        <img
            :src="templateDataImg"
            style="min-width: 200px;height: 200px; cursor:pointer;"
        />
      </a>
      <img
          slot="reference"
          :src="templateDataImg"
          style="min-width: 50px;height: 50px; cursor:pointer"
      />
    </el-popover>
    <div v-else>
        <span v-for="(item, index) in templateDataArr" :key="index">
          <span v-if="templateDataOptions == item.eName">
            {{ item.cName }}
          </span>
        </span>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  mounted() {
    // console.log(this.templateDataArr)
  },
  props: {
    templateDataImg: {
      type: String
    },
    templateDataArr: {
      type: Array
    },
    templateDataOptions: {
      type: String
    }
  }
};
</script>

<style scoped>
</style>
